# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Fabian Bornschein <fabiscafe-cat-mailbox-dog-org>
# Contributor: sebikul <sebikul@gmail.com>
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>

pkgname=geary
pkgver=44.1
pkgrel=1
epoch=1
pkgdesc='A lightweight email client for the GNOME desktop'
arch=(loong64 x86_64)
url=https://wiki.gnome.org/Apps/Geary
license=(GPL3)
groups=(gnome-extra)
depends=(
  at-spi2-core
  cairo
  dconf
  enchant
  folks
  gcr
  gdk-pixbuf2
  glib2
  glibc
  gmime3
  gnome-online-accounts
  gsound
  gspell
  gtk3
  hicolor-icon-theme
  icu
  iso-codes
  json-glib
  libgee
  libhandy
  libpeas
  libsecret
  libsoup3
  libstemmer
  libunwind
  libxml2
  libytnef
  org.freedesktop.secrets
  pango
  sqlite
  webkit2gtk-4.1
)
makedepends=(
  appstream-glib
  cmake
  git
  gobject-introspection
  meson
  vala
  yelp-tools
)
_commit=37c378a563d5b1c269d57c34671edc940d1cd180  # tags/44.1^0
source=("git+https://gitlab.gnome.org/GNOME/geary.git#commit=$_commit")
b2sums=('SKIP')
validpgpkeys=(
  3A2EF7F138557A145F2866E99FAB18747A8FC649 # Michael James Gratton <mike@vee.net>
)

prepare() {
  cd geary
}

pkgver() {
  cd geary
  git describe --tags | sed 's/^gnome-//g;s/[^-]*-g/r&/;s/-/+/g'
}

build() {
  local meson_options=(
    -D profile=release
  )

  arch-meson geary build "${meson_options[@]}"
  meson compile -C build
}

package() {
  meson install -C build --destdir "${pkgdir}"
}

# vim:set sw=2 sts=-1 et:
